//
//  UserInfo.m
//  ITHome
//
//  Created by lanou3g on 15/7/20.
//  Copyright (c) 2015年 YAX. All rights reserved.
//

#import "UserInfoModel.h"
#import "TheThirdCall.h"

@implementation UserInfoModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{

}


+ (UserInfoModel *)userInfoModelWithDictionary:(NSDictionary *)dictionary
{
    UserInfoModel *userInfoModel = [[UserInfoModel alloc] init];
    [userInfoModel setValuesForKeysWithDictionary:dictionary];
    userInfoModel.openId = [[TheThirdCall theThirdCallShare].tencentOauth openId];

    NSString *figureurl_qq_1 = [dictionary objectForKey:@"figureurl_qq_1"];
    // 把图片转换成uimage
    NSData *imageData_qq_40 = [NSData dataWithContentsOfURL:[NSURL URLWithString:figureurl_qq_1]];
    userInfoModel.figureurl_qq_1 = [UIImage imageWithData:imageData_qq_40];

    NSString *figureurl_qq_2 = [dictionary objectForKey:@"figureurl_qq_2"];
    // 把图片转换成uimage
    NSData *imageData_qq_100 = [NSData dataWithContentsOfURL:[NSURL URLWithString:figureurl_qq_2]];
    userInfoModel.figureurl_qq_2 = [UIImage imageWithData:imageData_qq_100];

    
    return userInfoModel;
}
@end
